package com.aggeek.springbootlearning;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * author:liuao
 * description:
 * Date: create on 10:07 2017/12/12
 * modify by:
 */
public class RegxStudy {
    String pattern="";
    String s="dnawoje239u4023841fjnlanf123i048923jfvnls";

    public static void main(String[] args){
        String url ="<img src=\"//www.baidu.\"com/img/baidu_jgylogo3.gif\">";
        String patternUrl = "<img.*src=\".*\"";
        Pattern compile = Pattern.compile(patternUrl);
        Matcher match = compile.matcher(url);
        String str="4.23";
        String patternStr = "^(\\d)+.(\\d){2}";
        Pattern csstrcompilestr = Pattern.compile(patternStr);
        Matcher matchstr = csstrcompilestr.matcher(str);
        StringBuilder sb = new StringBuilder();
        while (matchstr.find()){
            sb.append(matchstr.group());
        }
        //包含大小写8位以上
       String s1 = "^(?=.*[a-z])(?=.*[A-Z])(?=.*[a-z]).{8,}$";
        String s ="^(?=.*[A-Za-z]).{1,}";
        String m = "@223456asdas";
        Pattern csstr = Pattern.compile(s1);
        Matcher mmtchstr = csstr.matcher(m);
        while (mmtchstr.find()){
            System.out.println(mmtchstr.group());
        }

    }
}
